﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Softyum.ForexAgent.Controls
{
    public partial class PopupTitleBar : UserControl
    {
        public delegate void CloseButtonClickHandler(object sender, EventArgs e);
        [Category("Action")]
        public event CloseButtonClickHandler CloseClick;

        public PopupTitleBar()
        {
            InitializeComponent();
        }

        [Category("Appearance")]
        [DefaultValue("")]
        public string Title
        {
            get
            {
                return this.label1.Text;
            }
            set
            {
                this.label1.Text = value;
            }
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            RaiseCloseButtonClick(sender, e);
        }

        private void RaiseCloseButtonClick(object sender, EventArgs e)
        {
            if (CloseClick != null)
                CloseClick(sender, e);
        }
    }
}
